import { defineComponent } from 'vue'
import CodeShow from './CodeShow.vue'
import { codeTextJsxOption } from './codetext'
import './jsxcss.css'

export default defineComponent({
  name: 'MyComponent',
  props: {
    msg: String
  },
  data() {
    return {
      count: 0
    }
  },
  methods: {
    increment() {
      this.count++
    }
  },
  render() {
    return (
      <div>
        <h2 class="title">{this.msg}</h2>
        <button onClick={this.increment}>count is {this.count}</button>
        <CodeShow code-text={codeTextJsxOption} />
      </div>
    )
  }
})